import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import 'pos_link_platform_interface.dart';

/// An implementation of [PosLinkPlatform] that uses method channels.
class MethodChannelPosLink extends PosLinkPlatform {
  /// The method channel used to interact with the native platform.
  @visibleForTesting
  final methodChannel = const MethodChannel('pos_link');

  @override
  Future<String?> getPlatformVersion() async {
    final version = await methodChannel.invokeMethod<String>('getPlatformVersion');
    return version;
  }

  /*
    获取权限
   */
  @override
  Future<bool> permissionAllowed() async{
    return await methodChannel.invokeMethod('permissionAllowed');
  }

  @override
  Future<void> configureFlutterEngine() async {
    await methodChannel.invokeMethod("configureFlutterEngine");
  }

}
